package com.nami.conver.types.util;

public class ConverUtil {

    public static final String TEMPLATE_CONVER_CACHE_KEY = "appkey:%s|user_id:%s|grp:%s";

    public static final String TEMPLATE_C2C_CONVER_CACHE_KEY = "appkey:%s|user_id:%s|recv_id:%s";


    public static String genLocalCacheConverKey(String appKey, String senderId, String receiverId) {
        return String.format(TEMPLATE_CONVER_CACHE_KEY, appKey, senderId, receiverId);
    }

    public static String genPrivateConverKey(String appKey, String senderId, String recvId) {
        return genPrivateConverCacheKey(appKey,  senderId, recvId);
    }

    public static String genPrivateConverCacheKey(String appKey, String senderId, String receiverId) {
        return String.format(TEMPLATE_C2C_CONVER_CACHE_KEY, appKey, senderId, receiverId);
    }

}
